home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / tclib20.zip / ANSIHK.H next >
C/C++ Source or Header  |  1988-12-03  |  2KB  |  78 lines

  1. /* TCHK 2.0 - Howard Kapustein's Turbo C library       12-3-88 */
  2. /* Copyright (C) 1988, Howard Kapustein.  All rights reserved. */
  3.  
  4. /* ansihk.h  -  ANSI control header file */
  5.  
  6. #ifndef ANSI_HEADER
  7. #define ANSI_HEADER 1
  8.  
  9. #include <howard.h>
  10.  
  11. #ifndef ANSI_COLORS
  12. #define A_BLACK     30         /* foreground */
  13. #define A_RED       31
  14. #define A_GREEN     32
  15. #define A_YELLOW    33
  16. #define A_BLUE      34
  17. #define A_MAGENTA   35
  18. #define A_CYAN      36
  19. #define A_WHITE     37
  20. #define A_LBLACK    130         /* bright foreground */
  21. #define A_LRED      131
  22. #define A_LGREEN    132
  23. #define A_LYELLOW   133
  24. #define A_LBLUE     134
  25. #define A_LMAGENTA  135
  26. #define A_LCYAN     136
  27. #define A_LWHITE    137
  28.  
  29. #define A_B_BLACK       40
  30. #define A_B_RED         41
  31. #define A_B_GREEN       42
  32. #define A_B_YELLOW      43
  33. #define A_B_BLUE        44
  34. #define A_B_MAGENTA     45
  35. #define A_B_CYAN        46
  36. #define A_B_WHITE       47
  37.  
  38. #define A_UNDERLINE 34
  39.  
  40. #define ANSI_COLORS 1
  41. #endif
  42.  
  43.  
  44. /* function prototypes */
  45. char *ansi_call(int subfunction, int parm1, int parm2, char *ansistring);
  46. int ansifore(char code);            /* convert DOS foreground -> ansi code */
  47. int ansiback(char code);            /* convert DOS background -> ansi code */
  48.  
  49. /*  Subfunctions:   1:  gotoxy(parm1,parm2)
  50.                     2:  cursor_right
  51.                     3:  cursor_left
  52.                     4:  cursor_up
  53.                     5:  cursor_down
  54.                     6:  save_cursor_position
  55.                     7:  restore_cursor_position
  56.                     8:  cls()
  57.                     9:  clear_eol()
  58.                     10: set_foreground(parm1)
  59.                     11: set_background(parm1)
  60.                     12: clear_attributes         (plain, normal)
  61.                     13: bold
  62.                     14: faint
  63.                     15: italic
  64.                     16: blink
  65.                     17: fast_blink
  66.                     18: inverse
  67.                     19: invisible
  68.                     20: set_mode(parm1)
  69.                     21: reset_mode(parm1)
  70.                     22: wherexy()
  71.  
  72.  Subfunction 20: set_mode(parm1)
  73.  
  74.     MODE:   0-6     sets mode
  75.              7      automatic text wrap at the end of the line
  76. */
  77. #endif              /* ANSI_HEADER */
  78.